Skip to content

Conversation

rhythmx
Copy link

@rhythmx rhythmx commented Apr 13, 2022

I've been using this code recently to shoehorn some things into Ghidra by way of Jupyter and have come across a few issues.

  1. The default pexpect.TIMEOUT value causes long-running commands to break the kernel with an exception such as:
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
...
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7f8e787d9a20>
command: /usr/lib/jvm/java-11-openjdk/bin/java
...

This can be resolved by adding a very large timeout or catching the exception and retrying the expect call.

  1. A few issues with matching the Python repl prompts ("..." or ">>>") and terminal control characters can quickly cause the Kernel to become de-synchronized and start inserting garbled result blocks into notebooks. This can be resolved with some extra logic around execution and output matching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant